package com.ctsi.auth.integration;

/**
 * @author zhangjw
 * @className IntegrationAuthenticationContext
 * @description 集成校验上下文，基于ThreadLocal实现
 * @date 2019/2/21 14:10
 **/
public class IntegrationAuthenticationContext {

    private static ThreadLocal<IntegrationAuthentication> holder = new ThreadLocal<>();

    public static void set(IntegrationAuthentication integrationAuthentication){
        holder.set(integrationAuthentication);
    }

    public static IntegrationAuthentication get(){
        return holder.get();
    }

    public static void clear(){
        holder.remove();
    }

}
